#pragma once
#include <memory>
#include <functional>

#ifdef TX_RENDERER_EXPORTS
#define TX_RENDERER_API __declspec(dllexport)
#else
#define TX_RENDERER_API __declspec(dllimport)
#endif

class TX_RENDERER_API ITxRenderer
{
public:
	using sptr = std::shared_ptr<ITxRenderer>;
public:
	ITxRenderer();

	virtual ~ITxRenderer();

	static sptr create();

	virtual bool OnCreate(void* pWnd) = 0;

	virtual void OnDestory() = 0;

	virtual void OnSize(int w, int h) = 0;

	virtual void Render(uint8_t* i420, int width, int height) = 0;
};